/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pessoas.ufNonoDigito;

import pessoas.interfaces.IUFNonoDigito;
import pessoas.model.UFNonoDigito;

/**
 *
 * @author Bush
 */
public class UFNonoDigitoProcessor {
    
    private IUFNonoDigito successor;
    private IUFNonoDigito primeiro;

    public UFNonoDigitoProcessor() {
    }

    public void addEmailHandler(IUFNonoDigito uf) {
        if (this.primeiro == null) {
            this.primeiro = uf;
        } else {
            this.successor.setNext(uf);
        }
        this.successor = uf;
    }

    public boolean handleRequest(UFNonoDigito ufNono) throws Exception {
        return primeiro.handleRequest(ufNono);
    }
}
